package com.shop.mappers;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.shop.entities.Category;

/**
 * @author koni
 *
 */
public interface CategoryMapper {
	
	@Select("select * from category where id=#{id}")
	public Category findCategoryById(Integer id);
	
	//@Select("select * from category")
	public List<Category> findAllCategory();
	
	@Update("update category set name = #{name},description =#{description} where id = #{id}")
	public void update(Category c);
	
		
	@Delete("delete from Category where id = #{id}")
	public void delete(Category c);
	
	
	//@Insert("insert into Category (name,description) values(#{name},#{description})")
	public void add(Category c);
	
	
	
}
